package com.amit;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class BookDetailsServlet extends HttpServlet
{
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		//1.collect the data
		
		String bn=request.getParameter("bname");
		request.setAttribute("BN", bn);
		request.setAttribute("AU", "Srinivas");
		request.setAttribute("PUB", "JLC");
		request.setAttribute("COST", "9999.0");
		
		RequestDispatcher rd=request.getRequestDispatcher("viewdetails.jsp");
		rd.forward(request, response);
		
		
	}
	

}
